namespace Pronghorn.Core
{
	public class ScriptNodeVisitor : INodeVisitor
	{
		private bool isScript(string line)
		{
			return line.Contains("<!--#{scripts}-->");
		}

		private string parse(string line)
		{
			if(!isScript(line)) return line;
			return "RenderScripts(writer);\r\n";
		}

		public void Visit(ISkinNodeParser skinNodeParser)
		{
			skinNodeParser.Line = parse(skinNodeParser.Line);
		}
	}
}